<?php


namespace app\admin\validate;


use think\Validate;

class UserLevel extends Validate
{

    protected $rule = [
        'level_name'  => 'unique:user_level|length:4,10|chs',
        'pay_require' => 'number',
    ];

    protected $message = [
//        'level_name.require' => '等级名称不能为空',
        'level_name.unique'  => '等级名称已存在',
        'level_name.length'  => '等级名称只能在4-10个字符之间',
        'level_name.chs'     => '等级名称只能是汉字',
//        'pay_require.require' => '消费金额不能为空',
        'pay_require.number'  => '消费金额只能是数字',
    ];
}